#ifndef _PLAYER_MGR_HPP_20120626
#define _PLAYER_MGR_HPP_20120626

#include "base.hpp"
#include "cmd_type.hpp"
#include "singleton.hpp"

using namespace cmd;

class Player;

class PlayerMgr : public Singleton<PlayerMgr>
{
	public :
		typedef __gnu_cxx::hash_map<RID, Player*> PlayerMap;
		typedef PlayerMap::iterator  PlayerMap_Iter;

		PlayerMgr();
		~PlayerMgr();

		Player * find_player(RID id);

		Player * create_player(Connection & conn, const RoleB & role_b, const Position & position);

	public :
		PlayerMap  _player_map;
};

#endif

